<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>盒子模型 | Introduction</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../css/字体.html" />
    
    
    <link rel="prev" href="../css/伪类.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="2.4"
        data-chapter-title="盒子模型"
        data-filepath="css/盒子模型.md"
        data-basepath=".."
        data-revision="Wed Apr 18 2018 23:41:29 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="html.html">
            
            <span><b>1.</b> HTML</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="html/html的基本结构和内容.html">
            
                
                    <a href="../html/html的基本结构和内容.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        HTML
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="html/a-标签.html">
            
                
                    <a href="../html/a-标签.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        a-标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="html/img.html">
            
                
                    <a href="../html/img.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        img-标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="html/biaoge.html">
            
                
                    <a href="../html/biaoge.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        table-表格
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="html/列表与表单.html">
            
                
                    <a href="../html/列表与表单.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        列表与表单
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="html/音频和视频-标签.html">
            
                
                    <a href="../html/音频和视频-标签.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        音频与视频
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="html/iframe内嵌框架.html">
            
                
                    <a href="../html/iframe内嵌框架.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        iframe内嵌框架
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="CSS.html">
            
            <span><b>2.</b> CSS</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="css/CSS语法.html">
            
                
                    <a href="../css/CSS语法.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        CSS基本语法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="css/选择器.html">
            
                
                    <a href="../css/选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="css/伪类.html">
            
                
                    <a href="../css/伪类.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        伪类
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="2.4" data-path="css/盒子模型.html">
            
                
                    <a href="../css/盒子模型.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        盒子模型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="css/字体.html">
            
                
                    <a href="../css/字体.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        字体
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="css/行高.html">
            
                
                    <a href="../css/行高.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        行高
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >Introduction</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <p><img src="../img/123.png" alt="&#x56FE;&#x7247;"></p>
<h1 id="welcome-to-use-my-xtnotebook">Welcome to use My XT-Notebook</h1>
<h2 id="&#x76D2;&#x5B50;&#x6A21;&#x578B;">&#x76D2;&#x5B50;&#x6A21;&#x578B;</h2>
<h3 id="1&#x76D2;&#x5B50;&#x6A21;&#x578B;&#x57FA;&#x672C;&#x5C5E;&#x6027;">1.&#x76D2;&#x5B50;&#x6A21;&#x578B;&#x57FA;&#x672C;&#x5C5E;&#x6027;</h3>
<table>
<thead>
<tr>
<th style="text-align:center">&#x7C7B;</th>
<th style="text-align:center">&#x5C5E;&#x6027;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">content</td>
<td style="text-align:center">&#x5185;&#x5BB9;,&#x84DD;&#x8272;</td>
</tr>
<tr>
<td style="text-align:center">padding</td>
<td style="text-align:center">&#x5185;&#x8FB9;&#x8DDD;,&#x7EFF;&#x8272;</td>
</tr>
<tr>
<td style="text-align:center">border</td>
<td style="text-align:center">&#x8FB9;&#x6846;,&#x9EC4;&#x8272;</td>
</tr>
<tr>
<td style="text-align:center">margin</td>
<td style="text-align:center">&#x5916;&#x8FB9;&#x8DDD;,&#x6A59;&#x8272;</td>
</tr>
</tbody>
</table>
<h3 id="2&#x76D2;&#x5B50;&#x7ED3;&#x6784;">2.&#x76D2;&#x5B50;&#x7ED3;&#x6784;</h3>
<pre><code>&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset=&quot;UTF-8&quot;&gt;
        &lt;title&gt;&#x76D2;&#x5B50;&#x6A21;&#x578B;&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;style type=&quot;text/css&quot;&gt;
            *{
                margin: 0;
                padding: 0;
            }
            .daxiong{
                width: 300px;
                height: 150px;
                background: skyblue;

                padding: 50px;
                border:10px solid black;
                margin: 20px;
            }

            .panghu{
                width:350px;
                height: 220px;
                padding: 20px;
                border:10px solid black;
                /* &#x4EE5;&#x8FB9;&#x6846;&#x5185;&#x8BA1;&#x7B97;width&#x548C;height */
                box-sizing: border-box;

                /* &#x590D;&#x5408;&#x5C5E;&#x6027; xx- */
                margin-top: 10px;
                margin-bottom: 20px;
                margin-left: 30px;
                margin-right: 40px;

                /* &#x8BBE;&#x7F6E;4&#x4E2A;&#x503C;&#xFF1A; &#x987A;&#x65F6;&#x9488; &#x4E0A; &#x53F3; &#x4E0B; &#x5DE6; */
                margin:10px 20px 30px 40px;

                /* &#x8BBE;&#x7F6E;3&#x4E2A;&#x503C;  &#x4E0A; &#x5DE6;&#x53F3; &#x4E0B;*/
                margin: 10px 20px 30px;

                /* &#x8BBE;&#x7F6E;2&#x4E2A;&#x503C;  &#x4E0A;&#x4E0B; &#x5DE6;&#x53F3;*/
                margin: 10px auto;

                border-radius: 8px;
            }

            .zfx{
                width: 0px;
                height: 0px;
                border: 10px solid transparent;
                border-top-color: #2DCB70;
                /* &#x5706;&#x89D2; */
                /*border-radius: 50px;*/
                border-top-color:red;
                border-bottum-color:transparent;
                border-left-color:transparent;
                border-right-color:transparent;

            }
            .hh{
                    display: block;
                    width: 0;
                    height: 0;
                    overflow: hidden;
                    border: 100px solid transparent;
                    border-top-color: #2DCB70;
            }
        &lt;/style&gt;
        &lt;!--
            w3c&#x6807;&#x51C6;&#x7684;&#x76D2;&#x5B50;&#x6A21;&#x578B; 
                &#x5185;&#x5BB9;        content        &#x84DD;&#x8272;
                &#x5185;&#x8FB9;&#x8DDD;    padding        &#x7EFF;&#x8272;
                &#x8FB9;&#x6846;        border        &#x9EC4;&#x8272;
                &#x5916;&#x8FB9;&#x8DDD;    margin        &#x6A59;&#x8272;

            &#x5360;&#x5730;&#x9762;&#x79EF;&#xFF1A;content + padding + border
        --&gt;
        &lt;div class=&quot;daxiong&quot;&gt;
            &#x5927;&#x96C4;&#x7684;&#x5BB6;
        &lt;/div&gt;

        &lt;!--
            IE5&#x3001;IE6&#x7684;&#x201C;&#x602A;&#x5F02;&#x6A21;&#x5F0F;&#x201D;&#x76D2;&#x5B50;&#x6A21;&#x578B;
            IE&#x76D2;&#x5B50;
            &#x8BA1;&#x7B97;&#x65B9;&#x5F0F;:&#x5BBD;&#x5EA6;&#x548C;&#x9AD8;&#x5EA6;&#x5305;&#x542B;&#x4E86;&#x8FB9;&#x6846;&#x4EE5;&#x5185;&#x7684;&#x6240;&#x6709;&#x8303;&#x56F4;
            box-sizing:border-box
        --&gt;
        &lt;div class=&quot;panghu&quot;&gt;
            &#x80D6;&#x864E;&#x7684;&#x5BB6;
        &lt;/div&gt;
        &lt;div class=&quot;zfx&quot;&gt;
            &#x6B63;&#x65B9;&#x5F62;
        &lt;/div&gt;
        &lt;div class=&quot;hh&quot;&gt;
            hhaha
        &lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>
                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../css/伪类.html" class="navigation navigation-prev " aria-label="Previous page: 伪类"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../css/字体.html" class="navigation navigation-next " aria-label="Next page: 字体"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"expandable-chapters":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
